<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>锤子科技官方网站</title>

<style>

#menu1{
	margin-top: 30px;
	padding-bottom: 15px;

	height: 30px;
	box-shadow:0px 2px 1px -1px #999;
	          _webkit-box-shadow:0px 2px 1px -1px #999;
	          _moz-box-shadow:0px 2px 1px -1px #999;
}
#sortproducts{
	height: 30px;
	margin-bottom: 20px;
	margin-top: 15px;
}



#productsshow{
	border: 1px solid green;
	border-radius: 10px;
	width:1100px;
	height: 500px;
}

.center{
	display: table;
	float: left;
	width: 270;
	height: 300px;

}
.product{
	display: table-cell;
	text-align: center;
	vertical-align: middle;
	width: 250;
	height: 280px;
	border: 1px solid #CFF;
	-moz-box-shadow:3px 3px 3px rgba(187, 255, 255, 0.2) inset,
	                -3px -3px 3px rgba(187, 255, 255, 0.2) inset;           
	-webkit-box-shadow:3px 3px 3px rgba(187, 255, 255, 0.2) inset,
		               -3px -3px 3px rgba(187, 255, 255, 0.2) inset;       
	box-shadow:3px 3px 3px rgba(187, 255, 255, 0.2) inset,           
		       -3px -3px 3px rgba(187, 255, 255, 0.2) inset;
}

#productsshow img{
	width: 50px;
	height: 50px;
}



#aftersale{
	border: 1px solid red;
	border-radius: 10px;
	margin-bottom:50px;
	margin-top:30px;
	height: 150px;
	width: 1100px;
}
#aftersale table{
	width:1100px;
	text-align: center;
	vertical-align: middle;
}
#aftersale table td{
	width: 270px;
	padding: 3px;
}
#menu1 li, #sortproducts li{
	list-style: none;
	float: left;
	margin-right: 20px;
}
.product ul li{list-style: none;}

</style>

</head>

<body>

<?php
include "head.php";

include "mysql.php";
$aa = new mysql;
$aa->link("");
?>
<div id="tbody" style="width: 1100px; height: auto; margin: 0 auto; border: 0px solid #000">
    <div id="menu">
        <div id="menu1">
            <ul>
                <li>首页</li><li>手机</li>
            </ul>
        </div>
        <div id="sortproducts">
            <ul>
                <li>综合排序</li><li>销量排序</li><li>价格由低到高</li><li>价格由高到低</li>
            </ul>
        </div>
    </div>
    
    <div id="productsshow">
      
    
        <?php
		   // $fartherid = $this->id; 
		    $query = "select * from product_info";
			$result = $aa->excu($query);
			while ($product = mysqli_fetch_array($result, MYSQLI_ASSOC)){

		?>
       <div class="center">
        <div class="product">
            <ul>
                <?php $img = $product['imgsrc'];  $img = explode("#", $img);  $num = count($img); 
				    for($i = 0; $i < $num; $i++){  ?>
                <li><a href=""><img src="<?php echo $img[$i]; ?>" /></a></li>
                <?php } ?>
            </ul>
            
            <p class="productname"><a href=""><?php echo $product['name']; ?></a></p>
            <p class="productintro"><a href=""><?php echo $product['intro']; ?></a></p>
            
            <p class="span_dot"><?php for($i = 0; $i < $num; $i++){  ?>
                                      <span></span>
                                <?php } ?>
            </p>
            
            <p class="productprice">￥<?php echo $product['price']; ?></p>
            
            <form method="post" action="?id=<?php echo $product['id']; ?>">
            <a href="productshow.php?id=<?php echo $product['id']; ?>"><input type="submit" value="查看详情" id="showintro"></a>
            <input type="submit" value="加入购物车" id="addtocar">
            </form>
            
          </div>
        </div>
        <?php
			}
		?>

    </div>    
    
    <div id="aftersale">
        <table>
            <tr>
                <td><a href=""><img src="img/service.png" alt="" /></a></td><td><img src="img/days7.png" alt="" /></td><td><img src="img/days15.png" alt="" /></td><td><img src="img/freeshipping.png" alt="" /></td>
            </tr>
            <tr>
                <td><a href=""><strong>在线客服</strong></a></td><td><strong>7天无理由退货</strong></td><td><strong>15天免费换货</strong></td><td><strong>满150元免运费</strong></td>
            </tr>
            <tr>
                <td><a href=""><small>周一至周日&nbsp;9:00-18:00</small></a></td><td><small>天无理由退货&nbsp;请放心购买</small></td><td><small>15天内如遇质量问题&nbsp;免费换货</small></td><td><small>全场使用顺丰快递</small></td>
            </tr>
        </table>
    </div>

</div>
<?php
include "foot.php";
?>
</body>
</html>